﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace VisitorDal
{
    /// <summary>
    /// 访问者
    /// </summary>
    class Program
    {
  
        static void Main(string[] args)
        {
        

            var sqlEd = new EmployeeDal<SqlHelper>();
            sqlEd.GetAll("select sql");

            var oraEd = new EmployeeDal<OracleHelper>();
            oraEd.GetAll("select oracle");
            Console.ReadKey();
        }


    }

    public class EmployeeDal<T> where T:IVisitor,new ()
    {
        public DataTable GetAll(string sql)
        {
            T db = new T();
            return db.GetDataTable(sql);
        }
    }
 
}
